package com.shoesmail.utils;

import com.shoesmail.domain.vo.JsonResultVo;
import com.shoesmail.mapper.AccountMapper;
import com.shoesmail.service.AccountGenericService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author : 生成账号
 * @description：TODO
 * @date ：2025/9/16 22:15
 */
@Component
public class AccountUtil {

    public static Long getAccount(AccountMapper accountMapper,AccountGenericService accountGenericService ){
        new Thread(accountGenericService::needGenericAccount).start();
        long account = accountMapper.getCanUseAccount();
        boolean b1 = accountMapper.setAccountState(account);
        if(!b1){
            return null;
        }
        return account;
    }
}
